import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import show from '@dfeidao/atom-web/ui/show';
import p001 from './p001';

export default async function a001(fd: IFeidaoAiBrowserComponent,staff_no: string) {
	// 这是修改页面的显示
	const update=fd.data.node.querySelector<HTMLDivElement>('[data-id="updata"]');
	set_node_cls(update,'display-n',false);
	show(fd.data.node);
		set(fd,"staff_no",staff_no);
	const res = await nodejs<{dt: Array<{}>}>('staff-management/zj-000003/s001',{filter:{staff_no}});
	const ren = await nodejs<{dt: Array<{}>}>('staff-management/zj-000003/s002',{filter:{staff_no}});
	const rep = await nodejs<{dt: Array<{}>,dp: Array<{}>}>('staff-management/zj-000001/s003',{});
	const renderData=Object.assign({},{res:res.dt},{ren:ren.dt,rez:rep.dt,reb:rep.dp});
	console.log("修改页面渲染的数据",renderData);
	render(fd,renderData,p001,'p001','inner');
}
